package com.shenmazong.grade.controller;

import com.shenmazong.cheat.entity.TbExamCheat;
import com.shenmazong.grade.entity.TbExamGrade;
import com.shenmazong.grade.entity.TbExamSkillGradeDetail;
import com.shenmazong.grade.entity.TbExamTheoryGradeDetail;
import com.shenmazong.grade.service.ExamGradeService;
import com.shenmazong.utils.ResultResponse;
import com.shenmazong.vo.BatchChooseIdVo;
import com.shenmazong.vo.ListParamVo;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;


/**
 *controller Qi
 */

@Api(tags = {"教学阶段管理"})
@RestController
public class ExamGradeController {

    @Autowired
    private ExamGradeService gradeService;

    /**
     * @description 考试成绩新增
     * @params [tbExamGrade]
     * @return com.shenmazong.utils.ResultResponse
     * @author Qi
     * @date 2021/9/22 13:41
     */
    @PostMapping("saveExamGrade")
    public ResultResponse saveExamGrade(@RequestBody TbExamGrade tbExamGrade){
        return gradeService.saveExamGrade(tbExamGrade);
    }

    /**
     * @description 考试成绩批量删除
     * @params [chooseIdVo]
     * @return com.shenmazong.utils.ResultResponse
     * @author Qi
     * @date 2021/9/22 13:41
     */
    @PostMapping("deleteExamGrade")
    public ResultResponse deleteExamGrade(@RequestBody BatchChooseIdVo chooseIdVo){
        return gradeService.deleteExamGrade(chooseIdVo);
    }

    /**
     * @description 考试成绩修改
     * @params [tbExamGrade]
     * @return com.shenmazong.utils.ResultResponse
     * @author Qi
     * @date 2021/9/22 13:41
     */
    @PostMapping("updateExamGrade")
    public ResultResponse updateExamGrade(@RequestBody TbExamGrade tbExamGrade){
        return gradeService.updateExamGrade(tbExamGrade);
    }

    /**
     * @description 考试成绩列表
     * @params [paramVo]
     * @return com.shenmazong.utils.ResultResponse
     * @author Qi
     * @date 2021/9/22 13:41
     */
    @PostMapping("listExamGrade")
    public ResultResponse listExamGrade(@RequestBody ListParamVo paramVo){
        return gradeService.listExamGrade(paramVo);
    }

    //技能考试明细新增
    @PostMapping("saveExamSkillGradeDetail")
    public ResultResponse saveExamSkillGradeDetail(@RequestBody TbExamSkillGradeDetail tbExamSkillGradeDetail){
        return gradeService.saveExamSkillGradeDetail(tbExamSkillGradeDetail);
    }
    //技能考试明细删除
    @PostMapping("deleteExamSkillGradeDetail")
    public ResultResponse deleteExamSkillGradeDetail(@RequestBody BatchChooseIdVo chooseIdVo){
        return gradeService.deleteExamSkillGradeDetail(chooseIdVo);
    }
    //技能考试明细修改
    @PostMapping("updateExamSkillGradeDetail")
    public ResultResponse updateExamSkillGradeDetail(@RequestBody TbExamSkillGradeDetail tbExamSkillGradeDetail){
        return gradeService.updateExamSkillGradeDetail(tbExamSkillGradeDetail);
    }
    //技能考试明细列表
    @PostMapping("listExamSkillGradeDetail")
    public ResultResponse listExamSkillGradeDetail(@RequestBody ListParamVo paramVo){
        return gradeService.listExamSkillGradeDetail(paramVo);
    }
    //理论考试明细新增
    @PostMapping("saveExamTheoryGradeDetail")
    public ResultResponse saveExamTheoryGradeDetail(@RequestBody TbExamTheoryGradeDetail tbExamTheoryGradeDetail){
        return gradeService.saveExamTheoryGradeDetail(tbExamTheoryGradeDetail);
    }
    //理论考试明细删除
    @PostMapping("deleteExamTheoryGradeDetail")
    public ResultResponse deleteExamTheoryGradeDetail(@RequestBody BatchChooseIdVo chooseIdVo){
        return gradeService.deleteExamTheoryGradeDetail(chooseIdVo);
    }
    //理论考试明细修改
    @PostMapping("updateExamTheoryGradeDetail")
    public ResultResponse updateExamTheoryGradeDetail(@RequestBody TbExamTheoryGradeDetail tbExamTheoryGradeDetail){
        return gradeService.updateExamTheoryGradeDetail(tbExamTheoryGradeDetail);
    }
    //理论考试明细列表
    @PostMapping("listExamTheoryGradeDetail")
    public ResultResponse listExamTheoryGradeDetail(@RequestBody ListParamVo paramVo){
        return gradeService.listExamTheoryGradeDetail(paramVo);
    }

}




